package main

import (
	"fmt"
	"strconv"
	"time"
)

func main() {

	go test() //开启一个线程

	for i := 0; i < 10; i++ {
		fmt.Println("test () hello,golang " + strconv.Itoa(i))
		time.Sleep(time.Second)
	}
}

//编一个函数，每隔一秒输出“hello,word”
func test() {
	for i := 0; i < 10; i++ {
		fmt.Println("test () hello,world" + strconv.Itoa(i))
		time.Sleep(time.Second)
	}

}
